//package com.qq.interceptor;
//
//import java.io.PrintWriter;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//import org.apache.commons.lang.StringUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Component;
//import org.springframework.web.method.HandlerMethod;
//import org.springframework.web.servlet.HandlerInterceptor;
//import org.springframework.web.servlet.ModelAndView;
//import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
//
//
///**
// * 拦截器
// *
// * @author wdg
// *
// */
//public class AbsHandlerInterceptor implements HandlerInterceptor {
//
//	private Logger logger = LoggerFactory.getLogger(AbsHandlerInterceptor.class);
//
//	long start = System.currentTimeMillis();
//
//	@Override
//	public boolean preHandle(HttpServletRequest request, HttpServletResponse response,Object handler) throws Exception {
//		String secretKey = request.getHeader("from");
//		if(!StringUtils.isNotBlank(secretKey)||secretKey.equals("gateway")){
//			response.setContentType("application/json; charset=utf-8");
//			PrintWriter writer = response.getWriter();
//			writer.write("非法访问");
//			return false;
//		}
//		return true;
//
//	}
//
//}